----------------------------------------------------------------------------------
      name:  <unnamed>
       log:  G:\My Drive\Research\CTC expansion\submission\ntj\stata replication f
> iles/output/figure4.log
  log type:  text
 opened on:   3 Dec 2023, 18:09:05

. 
. version 16      

. 
. use "$data/ctctaxsim_mar1kid1.dta", clear

. append using "$data/ctctaxsim_mar1kid2.dta"
(label YEAR already defined)

. append using "$data/ctctaxsim_mar1kid3.dta"
(label YEAR already defined)

. tab depx

       depx |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |     20,000       33.33       33.33
          2 |     20,000       33.33       66.67
          3 |     20,000       33.33      100.00
------------+-----------------------------------
      Total |     60,000      100.00

. 
. *** and total income
. gen totinc2017=negfiitax+earnings if year==2017
(30,000 missing values generated)

. bysort earnings depx: egen totinc17=max(totinc2017)

. gen totinc2018=negfiitax+earnings if year==2018
(30,000 missing values generated)

. bysort earnings depx: egen totinc18=max(totinc2018)

. gen totinc2021=negfedtax2021+earnings 

. 
. gen diftotinc20212018=totinc2021-totinc18

. gen diftotinc20212017=totinc2021-totinc17

. gen diftotinc20182017=totinc18-totinc17

. 
. sum totinc* diftotinc*

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
  totinc2017 |     30,000    50.12956    24.75958          0    93.8665
    totinc17 |     60,000    50.12956    24.75937          0    93.8665
  totinc2018 |     30,000    51.66564    25.65345          0    97.2522
    totinc18 |     60,000    51.66564    25.65323          0    97.2522
  totinc2021 |     60,000    54.37897    24.66724          3   100.2522
-------------+---------------------------------------------------------
dif~20212018 |     60,000    2.713334    1.953597  -.6007004   9.000001
dif~20212017 |     60,000     4.24941    1.757553     1.9813   9.000001
dif~20182017 |     60,000    1.536076    .9446111          0   3.385696

. 
. *** to see where tax credits fall to zero
. gen min2017=totinc17-earnings

. gen min2018=totinc18-earnings

. gen min2021=totinc2021-earnings

. tab earnings min2017 if depx==1 & abs(min2017)<.005

           |                        min2017
  earnings | -.0025406          0    .000061   .0026588      .0034 |     Total
-----------+-------------------------------------------------------+----------
         0 |         0          2          0          0          0 |         2 
       .01 |         0          0          0          0          2 |         2 
     41.21 |         0          0          0          2          0 |         2 
     41.22 |         0          0          2          0          0 |         2 
     41.23 |         2          0          0          0          0 |         2 
-----------+-------------------------------------------------------+----------
     Total |         2          2          2          2          2 |        10 

. tab earnings min2018 if depx==1 & abs(min2018)<.005

           |                        min2018
  earnings | -.0030518  -.0002518          0   .0025406      .0034 |     Total
-----------+-------------------------------------------------------+----------
         0 |         0          0          2          0          0 |         2 
       .01 |         0          0          0          0          2 |         2 
     45.07 |         0          0          0          2          0 |         2 
     45.08 |         0          2          0          0          0 |         2 
     45.09 |         2          0          0          0          0 |         2 
-----------+-------------------------------------------------------+----------
     Total |         2          2          2          2          2 |        10 

. tab earnings min2021 if depx==1 & abs(min2021)<.005

           |                        min2021
  earnings |    -.0042  -.0035019  -.0029984  -.0019989  -.0018005 |     Total
-----------+-------------------------------------------------------+----------
     51.04 |         0          0          0          0          0 |         1 
     51.05 |         0          0          0          0          0 |         1 
     51.06 |         0          0          0          0          0 |         1 
     51.07 |         0          0          0          0          0 |         1 
     51.08 |         0          0          0          1          0 |         1 
     51.09 |         0          1          0          0          0 |         1 
     52.14 |         0          0          0          0          0 |         1 
     52.15 |         0          0          0          0          0 |         1 
     52.16 |         0          0          0          0          0 |         1 
     52.17 |         0          0          0          0          0 |         1 
     52.18 |         0          0          0          0          0 |         1 
     52.19 |         0          0          0          0          1 |         1 
      52.2 |         0          0          1          0          0 |         1 
     52.21 |         1          0          0          0          0 |         1 
-----------+-------------------------------------------------------+----------
     Total |         1          1          1          1          1 |        14 


           |                        min2021
  earnings | -.0005989  -.0004997   .0005989   .0009995   .0018005 |     Total
-----------+-------------------------------------------------------+----------
     51.04 |         0          0          0          0          0 |         1 
     51.05 |         0          0          0          0          0 |         1 
     51.06 |         0          0          0          1          0 |         1 
     51.07 |         0          1          0          0          0 |         1 
     51.08 |         0          0          0          0          0 |         1 
     51.09 |         0          0          0          0          0 |         1 
     52.14 |         0          0          0          0          0 |         1 
     52.15 |         0          0          0          0          0 |         1 
     52.16 |         0          0          0          0          1 |         1 
     52.17 |         0          0          1          0          0 |         1 
     52.18 |         1          0          0          0          0 |         1 
     52.19 |         0          0          0          0          0 |         1 
      52.2 |         0          0          0          0          0 |         1 
     52.21 |         0          0          0          0          0 |         1 
-----------+-------------------------------------------------------+----------
     Total |         1          1          1          1          1 |        14 


           |                   min2021
  earnings |  .0024986   .0029984   .0040016      .0042 |     Total
-----------+--------------------------------------------+----------
     51.04 |         0          0          1          0 |         1 
     51.05 |         1          0          0          0 |         1 
     51.06 |         0          0          0          0 |         1 
     51.07 |         0          0          0          0 |         1 
     51.08 |         0          0          0          0 |         1 
     51.09 |         0          0          0          0 |         1 
     52.14 |         0          0          0          1 |         1 
     52.15 |         0          1          0          0 |         1 
     52.16 |         0          0          0          0 |         1 
     52.17 |         0          0          0          0 |         1 
     52.18 |         0          0          0          0 |         1 
     52.19 |         0          0          0          0 |         1 
      52.2 |         0          0          0          0 |         1 
     52.21 |         0          0          0          0 |         1 
-----------+--------------------------------------------+----------
     Total |         1          1          1          1 |        14 

. 
. foreach var in totinc17 earnings totinc18 totinc2021{
  2.         replace `var'=`var'/10
  3. }
(59,994 real changes made)
(59,994 real changes made)
(59,994 real changes made)
(60,000 real changes made)

. 
. twoway line diftotinc20212018 earnings if year==2018 & depx==1, pstyle(p1) || li
> ne diftotinc20212017 earnings if year==2017 & depx==1, lp(_) pstyle(p2) || line 
> diftotinc20182017 earnings if year==2018 & depx==1, lp(-)  pstyle(p1) graphregio
> n(color(white)) bgcolor(white) leg(order(1 "2021 vs 2020" 2 "2021 vs 2017" 3 "20
> 20 vs 2017") c(1) pos(12) ring(0)) ytitle("Change in Tax Credits ($1,000s)") xti
> tle("Pre-Tax Earnings ($10,000s)" "{bf:Panel A: One Child}") ylabel(0(3.000)9.00
> 0)

. graph save "$output/changeinaftertaxincome1.gph", replace
(file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/changeinaftertaxincome1.gph not found)
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication files/out
> put/changeinaftertaxincome1.gph saved

. 
. twoway line diftotinc20212018 earnings if year==2018 & depx==2, pstyle(p1) || li
> ne diftotinc20212017 earnings if year==2017 & depx==2, lp(_) pstyle(p2) || line 
> diftotinc20182017 earnings if year==2018 & depx==2, lp(-)  pstyle(p1) graphregio
> n(color(white)) bgcolor(white) leg(order(1 "2021 vs 2020" 2 "2021 vs 2017" 3 "20
> 20 vs 2017") c(1) pos(12) ring(0)) ytitle("Change in Tax Credits ($1,000s)") xti
> tle("Pre-Tax Earnings ($10,000s)" "{bf:Panel B: Two Children}") ylabel(0(3.000)9
> .000)

. graph save "$output/changeinaftertaxincome2.gph", replace
(file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/changeinaftertaxincome2.gph not found)
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication files/out
> put/changeinaftertaxincome2.gph saved

. 
. 
. twoway line diftotinc20212018 earnings if year==2018 & depx==3, pstyle(p1) || li
> ne diftotinc20212017 earnings if year==2017 & depx==3, lp(_) pstyle(p2) || line 
> diftotinc20182017 earnings if year==2018 & depx==3, lp(-)  pstyle(p1) graphregio
> n(color(white)) bgcolor(white) leg(off) text(8 6 "See legend in other panels" , 
> box fc(white) margin(small) j(left) size(medsmall)) ytitle("Change in Tax Credit
> s ($1,000s)") xtitle("Pre-Tax Earnings ($10,000s)" "{bf:Panel C: Three Children}
> ") ylabel(0(3.000)9.000)

. graph save "$output/changeinaftertaxincome3.gph", replace
(file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/changeinaftertaxincome3.gph not found)
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication files/out
> put/changeinaftertaxincome3.gph saved

. 
. graph combine "$output/changeinaftertaxincome1.gph" "$output/changeinaftertaxinc
> ome2.gph" "$output/changeinaftertaxincome3.gph",graphregion(color(white)) 

. graph export "$output/figure4.png", replace
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/figure4.png saved as PNG format

. 
. erase "$output/changeinaftertaxincome1.gph" 

. erase "$output/changeinaftertaxincome2.gph" 

. erase "$output/changeinaftertaxincome3.gph"

. 
. log close
      name:  <unnamed>
       log:  G:\My Drive\Research\CTC expansion\submission\ntj\stata replication f
> iles/output/figure4.log
  log type:  text
 closed on:   3 Dec 2023, 18:09:09
----------------------------------------------------------------------------------
